
<div>
	<p>Ngày thống kê: <?php echo $this->history->created_at; ?></p>
	<p>Keyword: <?php echo $this->keyword->name; ?></p>
</div>
<br/>
	<?php
	if($this->paginator){
		echo $this->paginationControl($this->paginator, 'Sliding', 'ranking/paging.phtml',array());
	} 
	?><!-- END PAGING! -->


	<ul>
		<li class="row_ranking">
				<div class="row_ranking_wrapper">
					<table>
						<tr>
							<td class="col_0">
								Rank
							</td>
							<td class="col_1">
								Title
							</td>
							<td class="col_2" >
								Position rank
							</td>
							<td class="col_3">
								Position count
							</td>
						</tr>
					</table>
				</div>
			</li>	
		<?php 
			foreach ($this->rankings as $ranking):
		?>	
			<li class="row_ranking">
				<div class="row_ranking_wrapper">
					<table>
						<tr>
							<td class="col_0">
								<p><?php echo $ranking->rank;?></p>
							</td>
							<td class="col_1">
								<p>URL: <a href="<?php echo $ranking->page_url;?>" target="_blank"><?php echo $this->escape($ranking->page_url);?></a></p>
								<p>TITLE: <?php echo $this->escape($ranking->page_title);?></p>
								<p>DESC: <i><?php echo $this->escape($ranking->page_desc);?></i></p>
								<p>COUNT: <?php echo $ranking->count;?></p>
							</td>
							<td class="col_2" >
								<p><?php echo $ranking->position_rank;?></p>
							</td>
							<td class="col_3">
								<p><?php echo $ranking->position_count;?></p>
							</td>
						</tr>
					</table>
				</div>
			</li>	
		<?php 		
			endforeach;
		?>
	</ul>
	<br/>
	<?php
	if($this->paginator){
		echo $this->paginationControl($this->paginator, 'Sliding', 'ranking/paging.phtml',array());
	} 
	?><!-- END PAGING! -->

<script>

	var menu = {'page':'Page Ranking', 'keyword':'Keyword Ranking'};
	$(".website_ranking_menu").dContextMenu(menu, {'params':{'id':1,'b':2},'handle':'website_ranking_menu_handle'});

	
</script>
